package shuati.qihu360;

import java.util.Scanner;

/**
 * @author : LdLtd
 * @Date : 2023/10/28
 * @Description:
 */
public class staff {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int n,x;
            n=sc.nextInt();
            x=sc.nextInt();
            int [] abli=new int[n];
            //读入能力
            for (int j = 0; j < n; j++) {
                abli[j]=sc.nextInt();
            }
            int n2= (int) Math.ceil((n+1)/2);
            boolean[] vis = new boolean[abli.length];
            int res=search(abli,n2,x,0,vis,0);
            System.out.println(res);
        }
    }

    public static int search(int [] abli,int n2,int x,int path,boolean[] vis,int in){
        if(n2==0){
            if(path>=x){
                return 1;
            }else{
                return 0;
            }
        }
        int res=0;
        for (int i =in; i < abli.length; i++) {
          if(!vis[i]){
              vis[i]=true;
              path+=abli[i];
              res+=search(abli,n2-1,x,path,vis,i);
              vis[i]=false;
              path-=abli[i];
          }
        }
        return res;
    }

}
